public class everyonejia {
    public static void main(String[] args) {
        System.out.println(abs(123));
    }
    public static int abs(int n){
        if(n<10){
            return n%10;
        }
        return abs(n/10)+n%10;
    }
}

